local CheckWidgetType = UI.CheckWidgetType
local CheckArgType = UI.CheckArgType
local CheckArgWidget = UI.CheckArgWidget
local MakeAccessor = UI.MakeAccessor
local MakeTypeSetter = UI.MakeTypeSetter

--[[ CheckButton @FIXME ]]--
local CheckButton = UI.NewWidgetType("CheckButton", "Button")
CheckButton.parameters = {
}

function CheckButton:Initialize(o)
	local t = UI.params[o]
	assert(t)
end

UI.MakeTextureFunctions(CheckButton, "CheckButton", "Checked")
UI.MakeTextureFunctions(CheckButton, "CheckButton", "DisabledChecked")

function CheckButton.prototype:SetChecked(check)
	CheckWidgetType("CheckButton:SetChecked", self, "CheckButton")
	UI.params[self].checked = check and 1 or nil
end

function CheckButton.prototype:GetChecked()
	CheckWidgetType("CheckButton:GetChecked", self, "CheckButton")
	return UI.params[self].checked
end
